/* Copyright 2013 Google Inc.  All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.  You may obtain a copy
of the License at: http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distrib-
uted under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied.  See the License for
specific language governing permissions and limitations under the License.
*/

.cm-tab-panel {
  background: #fff;
  width: 306px;
  position: absolute;
  top: 5px;
  right: 5px;
  height: auto;
  max-height: 98%;
  overflow-y: hidden;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.cm-embedded .cm-tab-panel {
  float: none;
  width: 100%;
  z-index: 1;
  border: none;
}

.cm-tabbed .cm-map-wrapper {
  margin-left: 0 !important;
}

.cm-tabbed.cm-panel-left .cm-searchbox {
  margin-left: 320px; /* Move the searchbox over to avoid the panel. */
}

.cm-tab-bar-container {
  background: #444;
  /* @alternate */ background-image:-webkit-linear-gradient(top, #555, #333);
  /* @alternate */ background-image:linear-gradient(top, #555, #333);
  color: #ddd;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
}

.cm-tab-bar-container * {
  /* Prevent entire tab bar from becoming selected on mobile devices */
  -webkit-tap-highlight-color: transparent;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.cm-footer-shadow .cm-tab-panel {
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

.cm-footer-shadow .cm-tab-bar-container {
  border-top: none;
}

.cm-tab-bar-buttons {
  display: inline-block;
  float: right;
  height: 35px;
}

.cm-tab-panel-below .cm-tab-bar-buttons, .cm-touch .cm-tab-bar-buttons {
  height: 42px;
}

.cm-tab-content {
  overflow-x: visible;
  overflow-y: auto;
  -webkit-overflow-scrolling:touch;
}

.cm-panel-links a {
  display: inline-block;
}

.cm-tab-content input[type=checkbox] {
  margin-bottom: -2px;
}

.cm-tab-content::-webkit-scrollbar {
  -webkit-appearance: none;
}

.cm-tab-content::-webkit-scrollbar:vertical {
  width: 12px;
}

.cm-tab-content::-webkit-scrollbar-thumb {
  border-radius: 6px;
  border: 2px solid #fff;
  background-color: #777;
}

.cm-feature-info-content {
  margin: 12px;
  font-family: arial !important;  /* override Roboto specified by Maps API */
}

.cm-chevron-up:hover {
  background-color: #121212;
  /* @alternate */ background:url('chevron_up.png') center center no-repeat, -webkit-linear-gradient(top, #383838, #121212);
  /* @alternate */ background:url('chevron_up.png') center center no-repeat, linear-gradient(top, #383838, #121212);
}

.cm-chevron-down:hover {
  background-color: #121212;
  /* @alternate */ background:url('chevron_down.png') center center no-repeat, -webkit-linear-gradient(top, #383838, #121212);
  /* @alternate */ background:url('chevron_down.png') center center no-repeat, linear-gradient(top, #383838, #121212);
}

.cm-chevron-up, .cm-chevron-down {
  width: 35px;
  height: 35px;
  padding: 0px;
  margin: 0px;
  cursor: pointer;
  display: inline-block;
  -moz-user-select: none;
  -webkit-user-select: none;
}

.cm-chevron-up {
  background:url('chevron_up.png') center center no-repeat;
}

.cm-chevron-down {
  background: url('chevron_down.png') center center no-repeat;
}

.cm-tab-panel-below .cm-chevron-up, .cm-tab-panel-below .cm-chevron-down,
.cm-touch .cm-chevron-up, .cm-touch .cm-chevron-down {
  width: 42px;
  height: 42px;
}

.cm-tab-panel-below {
  top: inherit !important;
  width: inherit !important;
  right: inherit !important;
  left: inherit !important;
  box-shadow: none;
  position: relative;
  max-height: none;
}

.cm-tab-panel-below .cm-tab-container {
  border-bottom: none;
  width: 100% !important;
}

.cm-tabbed.cm-panel-right .cm-my-location-button {
  margin-right: 317px;
}

.cm-tabbed.cm-embedded .cm-my-location-button,
.cm-tabbed.cm-panel-below .cm-my-location-button {
  margin-right: 5px !important;
}

.cm-panel-left .cm-tab-panel {
  float: left;
  left: 5px;
}

.cm-tab-content .cm-map-picker-button {
  right: auto;
  margin-left: 6px;
  top: 0px;
  position: relative;
}

.cm-tabbed-legend-box {
  border-top: 1px solid #f0f0f0;
  margin: 12px 0;
  padding: 12px 12px 0 12px;
  overflow: hidden; /* fully enclose any floating children */
}

.cm-tabbed-legend-box.cm-first-tabbed-legend-box {
  border-top: 0px;
  padding: 0 12px 0 12px;
}

.cm-tabbed-legend-content {
  font-size: 11px;
  color: #222;
  margin: 6px 0 0;
}

.cm-tab-content .cm-legend-item {
  font-size: 12px;
}

.cm-tab-panel .cm-panel-header {
  margin: 12px 0px 6px 0px;
  padding: 0px 12px;
}

.cm-tab-content .cm-legend-graphic {
  margin: 2px 4px 4px 2px;
}

/*
 * TODO(romano,rew): Basic rules copied from
 * https://code.google.com/p/closure-library/source/browse/closure/goog/css/tab.css
 * to be replaced with our own rules and merged into main.css.
 */

.goog-tab {
  cursor: pointer;
  padding: 12px 9px 11px;
  font-size: 12px;
  line-height: 1.0;
  /* Transparent borders on every tab: makes room for border when selected */
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}

.cm-tab-panel-below .goog-tab, .cm-touch .goog-tab {
  padding: 14px;
  font-size: 14px;
}

.goog-tab-bar {
  outline: none;
  display: block;
  margin-right: 35px;  /* makes room for chevron button */
  border-right: 1px solid #606060;
  white-space: normal;
}

.cm-tab-panel-below .goog-tab-bar, .cm-touch .goog-tab-bar {
  margin-right: 42px;
}

.goog-tab-bar-top .goog-tab {
  display: inline-block;
  outline: none;
}

.goog-tab-bar-top:after,
.goog-tab-bar-bottom:after {
}

.goog-tab-bar-bottom .goog-tab {
  margin: 0 16px 1px 0;
  border-top: 0;
  outline: none;
}

.goog-tab-bar-start .goog-tab {
  margin: 0 0 4px 1px;
  border-right: 0;
}

.goog-tab-bar-end .goog-tab {
  margin: 0 1px 4px 0;
  border-left: 0;
}

.goog-tab-hover, .goog-tab-selected {
  background: #121212;
  /* @alternate */ background-image:-webkit-linear-gradient(top, #383838, #121212);
  /* @alternate */ background-image:linear-gradient(top, #383838, #121212);
}

/* State: Disabled */
.goog-tab-disabled {
  color: #666;
}

/* State: Selected */
.goog-tab-selected {
  text-decoration: none;
  color: #ddd;
  border-left: 1px solid #606060;
  border-right: 1px solid #606060;
}

.goog-tab-selected:first-child {
  /* No left-border on first selected tab. */
  border-left: 1px solid transparent;
}

.goog-tab-bar-top {
}

/*
 * Shift selected tabs 1px towards the contents (and compensate via margin and
 * padding) to visually merge the borders of the tab with the borders of the
 * content area.
 */
.goog-tab-bar-top .goog-tab-selected {
  margin-top: 0;
}

.goog-tab-bar-bottom .goog-tab-selected {
  margin-bottom: 0;
  padding-top: 5px;
}

.goog-tab-bar-start .goog-tab-selected {
  left: 1px;
  margin-left: 0;
  padding-right: 9px;
}

.goog-tab-bar-end .goog-tab-selected {
  left: -1px;
  margin-right: 0;
  padding-left: 9px;
}

/* Crowd reports */
.cm-crowd {
  margin-top: 12px;
  border-top: 1px solid #c0c0c0;
  background: #f0f0f0;
  overflow: hidden;
}

.cm-crowd .cm-notice {
  font-size: 11px;
  margin: 12px 0;
  color: #777;
}

.cm-crowd-report-form .cm-notice {
  margin: 6px 0;
}

/* Report collection area */
.cm-report-collection {
  padding: 0 12px;
}

.cm-crowd h2 {
  font-size: 12px;
  padding-top: 12px;
  margin: 0;
  color: #888;
  letter-spacing: -0.2px;
}

.cm-crowd-bubble {
  background: #ddd;
  padding: 6px 9px;
  margin: 12px 0 18px;
  border-radius: 4px 4px 4px 0;
  position: relative;
}

.cm-crowd-bubble.cm-collapsed .cm-close-button {
  display: none;
}

.cm-crowd-more {
  border-color: transparent transparent transparent #666;
  border-width: 4px 0 4px 5px;
  border-style: solid;
  position: absolute;
  right: 9px;
  top: 49%;
  margin-top: -4px;
}

.cm-crowd-bubble:hover .cm-crowd-more {
  border-color: transparent transparent transparent #000;
}

.cm-crowd-bubble.cm-collapsed:hover {
  cursor: pointer;
  background: #ccc;
}

.cm-crowd-bubble-tail {
  position: absolute;
  left: 0;
  bottom: -6px;
  border-width: 3px;
  border-color: #ddd transparent transparent #ddd;
  border-style: solid;
}

.cm-crowd-bubble.cm-collapsed:hover .cm-crowd-bubble-tail {
  border-color: #ccc transparent transparent #ccc;
}

.cm-crowd-bubble.cm-expanded .cm-crowd-report-prompt {
  display: none;
}

.cm-crowd-bubble.cm-collapsed .cm-crowd-report-form {
  display: none;
}

.cm-question {
  margin: 6px 0 12px;
}

.cm-question:first-child {
  margin-top: 0;
}

.cm-question h3 {
  margin: 6px 0;
  font-weight: 700;
  font-size: 13px;
}

.cm-answers {
  margin: 6px 0 12px;
}

.cm-answer input[type="text"],
.cm-report-text input[type="text"] {
  width: 100%;
}

.cm-crowd-report-form .cm-report-text {
  margin-top: 18px;
}

.cm-crowd .cm-button-area {
  margin: 12px 0 6px;
}

/* Report display area */
.cm-reports {
  margin: 12px 0;
  padding: 0 12px;
}

.cm-reports p {  /* Loading... message */
  margin: 12px 6px;
  color: #666;
  font-size: 11px;
  font-style: italic;
}

.cm-report {
  margin: 12px 0 3px;
  min-height: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cm-report-answers {
  padding: 9px 9px;
}

.cm-reports .cm-report-text {
  padding: 9px 9px;
  border-top: 1px solid #eee;
}

.cm-report .cm-answer {
  text-transform: uppercase;
  font-size: 11px;
  padding: 1px 3px;
  margin-right: 4px;
  display: inline-block;
  color: #000;
  background: #fff;
}

.cm-report .cm-time {
  font-size: 11px;
  float: right;
  color: #999;
  padding: 2px 0 0 6px;
}

.cm-report-vote {
  padding: 0 9px 9px 9px;
  font-size: 11px;
  color: #999;
  cursor: default;
}

.cm-report-vote .cm-vote-count {
  display: inline-block;
  min-width: 1em;
}

.cm-report-vote .cm-vote {
  display: inline-block;
  margin-left: 3px;
  width: 10px;
  height: 13px;
  border: 2px solid transparent;
  border-width: 2px 4px;
  margin: -2px 0 -5px -4px;
  opacity: 0.4;
}

.cm-report-vote .cm-upvote {
  background: url('thumb_up.png') no-repeat;
  margin-left: 6px;
}

.cm-report-vote .cm-downvote {
  background: url('thumb_down.png') no-repeat;
  margin-left: 0;
}

.cm-report-vote .cm-vote:hover {
  opacity: 0.6;
}

.cm-report-vote .cm-vote.cm-selected {
  opacity: 0.8;
}

.cm-report-vote .cm-vote.cm-selected:hover {
  opacity: 1;
}

.cm-report-vote .cm-report-abuse:link {
  float: right;
  color: #999;
  width: 14px;
  height: 14px;
  margin-top: -1px;
  background: url('spam.png') no-repeat;
  opacity: 0.4;
}

.cm-report-vote .cm-report-abuse:hover {
  opacity: 0.6;
}
